﻿using Machine.main.Models;
using MaterialDesignThemes.Wpf;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Machine.main.Services
{
    public class MenuItemService : BindableBase, IMenuItemService
    {
        private ObservableCollection<MenuItemModel> items;

        public ObservableCollection<MenuItemModel> Items
        {
            get { return items; }
            set { items = value; RaisePropertyChanged(); }
        }


        public MenuItemService()
        {
            Items = new ObservableCollection<MenuItemModel>();
            Items.Add(new MenuItemModel()
            {
                Name = "主页",
                Key = "Home",
                SelectedIcon = PackIconKind.Home,
                UnselectedIcon = PackIconKind.HomeOutline,
                Router = "HomePage"
            });
            Items.Add(new MenuItemModel()
            {
                Name = "参数",
                Key = "Parameter",
                SelectedIcon = PackIconKind.BookOpenPageVariant,
                UnselectedIcon = PackIconKind.BookOpenPageVariantOutline,
                Router = "ParameterPage"
            });
            Items.Add(new MenuItemModel()
            {
                Name = "历史记录",
                Key = "History",
                SelectedIcon = PackIconKind.FileDocumentAlert,
                UnselectedIcon = PackIconKind.FileDocumentAlertOutline,
                Router = "HistoryPage"
            });
            Items.Add(new MenuItemModel()
            {
                Name = "报警记录",
                Key = "Alram",
                SelectedIcon = PackIconKind.Post,
                UnselectedIcon = PackIconKind.PostOutline,
                Router = "AlramPage"
            });
            Items.Add(new MenuItemModel()
            {
                Name = "视觉设置",
                Key = "MachineVision",
                SelectedIcon = PackIconKind.FileEye,
                UnselectedIcon = PackIconKind.FileEyeOutline,
                Router = "MachineVisionPage"
            });
            Items.Add(new MenuItemModel()
            {
                Name = "运动控制设置",
                Key = "MotionControl",
                SelectedIcon = PackIconKind.BoomGate,
                UnselectedIcon = PackIconKind.BoomGateUpOutline,
                Router = "MotionControlPage"
            });
            Items.Add(new MenuItemModel()
            {
                Name = "IO设置",
                Key = "IOStatus",
                SelectedIcon = PackIconKind.Identifier,
                UnselectedIcon = PackIconKind.Identifier,
                Router = "IOStatusPage"
            });
            Items.Add(new MenuItemModel()
            {
                Name = "设置",
                Key = "Setting",
                SelectedIcon = PackIconKind.Settings,
                UnselectedIcon = PackIconKind.SettingsOutline,
                Router = "SettingPage"
            });
        }
    }
}
